<div class="app-main-default-container">
    <div appPageTool [btnsTpl]="btnsTpl">
        <ng-template #btnsTpl>
            <app-business-tool-btn [buttonList]="buttonList" (btnClick)="onBtnClick($event)">
            </app-business-tool-btn>
        </ng-template>
    </div>


    <form nz-form [formGroup]="saveForm">
        <nz-form-item>
            <nz-form-label [nzSm]="24" [nzMd]="24" [nzLg]="24" [nzXl]="24">
                <app-line-title title="基本信息"></app-line-title>
            </nz-form-label>
        </nz-form-item>

        <nz-form-item>
            <nz-form-label [nzSm]="24" [nzMd]="5" [nzLg]="3" [nzXl]="2" nzRequired>编号</nz-form-label>
            <nz-form-control [nzSm]="24" [nzMd]="7" [nzLg]="9" [nzXl]="10" nzErrorTip="编号格式不正确（格式：1-30个字符）!">
                <input type="text" nz-input formControlName="dicItemCode" placeholder="请输入..." />
            </nz-form-control>

            <nz-form-label [nzSm]="24" [nzMd]="5" [nzLg]="3" [nzXl]="2" nzRequired>名称</nz-form-label>
            <nz-form-control [nzSm]="24" [nzMd]="7" [nzLg]="9" [nzXl]="10" nzErrorTip="名称格式不正确（格式：1-30个字符）!">
                <input type="text" nz-input formControlName="dicItemName" placeholder="请输入..." />
            </nz-form-control>
        </nz-form-item>

        <nz-form-item>
            <nz-form-label [nzSm]="24" [nzMd]="5" [nzLg]="3" [nzXl]="2" nzRequired>值</nz-form-label>
            <nz-form-control [nzSm]="24" [nzMd]="7" [nzLg]="9" [nzXl]="10" nzErrorTip="值格式不正确（格式：1-256个字符）!">
                <input type="text" nz-input formControlName="dicItemValue" placeholder="请输入..." />
            </nz-form-control>

            <nz-form-label [nzSm]="24" [nzMd]="5" [nzLg]="3" [nzXl]="2">备用值</nz-form-label>
            <nz-form-control [nzSm]="24" [nzMd]="7" [nzLg]="9" [nzXl]="10" nzErrorTip="备用值格式不正确（格式：0-256个字符）！">
                <input type="text" nz-input formControlName="spareValue" placeholder="请输入..." />
            </nz-form-control>
        </nz-form-item>

        <nz-form-item>
            <nz-form-label [nzSm]="24" [nzMd]="5" [nzLg]="3" [nzXl]="2">默认值</nz-form-label>
            <nz-form-control [nzSm]="24" [nzMd]="7" [nzLg]="9" [nzXl]="10" nzErrorTip="默认值格式不正确（格式：0-256个字符）!">
                <input type="text" nz-input formControlName="defaultValue" placeholder="请输入..." />
            </nz-form-control>

            <nz-form-label [nzSm]="24" [nzMd]="5" [nzLg]="3" [nzXl]="2" nzRequired>序号</nz-form-label>
            <nz-form-control [nzSm]="24" [nzMd]="7" [nzLg]="9" [nzXl]="10" nzErrorTip="序号格式不正确（格式：1-3位数字）!">
                <input type="text" nz-input formControlName="sortNum" placeholder="请输入..." />
            </nz-form-control>
        </nz-form-item>

        <nz-form-item>
            <nz-form-label [nzSm]="24" [nzMd]="5" [nzLg]="3" [nzXl]="2">上一级</nz-form-label>
            <nz-form-control [nzSm]="24" [nzMd]="7" [nzLg]="9" [nzXl]="10" nzErrorTip="请选择上一级!">
                <nz-tree-select [nzNodes]="dicItemOptionList" nzShowSearch nzPlaceHolder="请选择..." [nzAllowClear]="true"
                    [nzDropdownStyle]="{'max-height':'300px'}" formControlName="dicItemParentId"  (ngModelChange)="selectParentDicItem($event)">
                </nz-tree-select>
            </nz-form-control>

            <nz-form-label [nzSm]="24" [nzMd]="5" [nzLg]="3" [nzXl]="2">图标</nz-form-label>
            <nz-form-control [nzSm]="24" [nzMd]="7" [nzLg]="9" [nzXl]="10" nzErrorTip="图标格式不正确（格式：1-32个字符）！">
                <input type="text" nz-input formControlName="iconCls" placeholder="请输入..." />
            </nz-form-control>
        </nz-form-item>

        <nz-form-item>
            <nz-form-label [nzSm]="24" [nzMd]="5" [nzLg]="3" [nzXl]="2">描述</nz-form-label>
            <nz-form-control [nzSm]="24" [nzMd]="7" [nzLg]="9" [nzXl]="10" nzErrorTip="描述格式不正确（格式：0-256个字符）!">
                <textarea nz-input rows="3" formControlName="dicItemDesc" placeholder="请输入..."></textarea>
            </nz-form-control>

            <nz-form-label [nzSm]="24" [nzMd]="5" [nzLg]="3" [nzXl]="2" nzRequired>状态</nz-form-label>
            <nz-form-control [nzSm]="24" [nzMd]="7" [nzLg]="9" [nzXl]="10" nzErrorTip="请选择状态！">
                <nz-select formControlName="status" nzAllowClear nzPlaceHolder="请选择...">
                    <nz-option [nzValue]="item.dicItemValue" [nzLabel]="item.dicItemName"
                        *ngFor="let item  of statusOptionList">
                    </nz-option>
                </nz-select>
            </nz-form-control>
        </nz-form-item>

    </form>

</div>